<?php

using('Library.Patterns.Object');

class IApplication extends Object
{
    function _LoadView($view)
    {
        if (file_exists($file = W_ENV_PATH.'/Views/'.$view.'/view.php'))
        {
            include_once $file;

            if (class_exists($class = 'View_'.$view))
                return new $class();
            else
            {
                $this->_Error->Log('Application :: Unable to Instance View \''.$class.'\'', W_LOG_CRIT);
                return false;
            }
        }
        else
        {
            $this->_Error->Log('Application :: Unable to Locate View \''.$file.'\'', W_LOG_CRIT);
            return false;
        }
    }
}

?>